﻿using SqlSugar;
using System.ComponentModel.DataAnnotations;

namespace HY.Model
{
    [SugarTable("sys_resource")]
    public class SysResource : BaseModel
    {
        /// <summary>
        /// 父级Id
        /// </summary>
        [SugarColumn(ColumnName = "parent_id")]
        public int ParentId { get; set; }

        /// <summary>
        /// 资源名称
        /// </summary>
        [Required]
        [SugarColumn(ColumnName = "resource_name")]
        public string ResourceName { get; set; }

        /// <summary>
        /// 资源链接
        /// </summary>
        [SugarColumn(ColumnName = "resource_url")]
        public string ResourceUrl { get; set; }

        /// <summary>
        /// 资源图标
        /// </summary>
        [SugarColumn(ColumnName = "resource_icon")]
        public string ResourceIcon { get; set; }

        /// <summary>
        /// 资源类型 1菜单2按钮
        /// </summary>
        [SugarColumn(ColumnName = "resource_type")]
        public int ResourceType { get; set; }

        /// <summary>
        /// 菜单状态
        /// </summary>
        [SugarColumn(ColumnName = "resource_state")]
        public bool ResourceState { get; set; } = true;

        /// <summary>
        /// 排序号
        /// </summary>
        [SugarColumn(ColumnName = "sort_number", DefaultValue = "0")]
        public int SortNumber { get; set; }
    }
}
